Skip to content

Conversation

@calvinhzy
Copy link
Member


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

Remove DATA_COSMOS_TABLE and DATA_STORAGE references as track 1 sdk has been deprecated and removed from main CLI repo.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@calvinhzy calvinhzy self-assigned this Aug 29, 2025
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Aug 29, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Aug 29, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

@yonzhan yonzhan requested a review from evelyn-ys August 29, 2025 08:58
@calvinhzy calvinhzy requested review from MSSedusch and qwordy August 29, 2025 09:50
@calvinhzy calvinhzy marked this pull request as ready for review August 29, 2025 09:51
Copilot AI review requested due to automatic review settings August 29, 2025 09:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes deprecated Track 1 SDK references by updating to Track 2 SDK equivalents for Azure Storage and Table services. The changes are part of modernizing the Azure CLI AEM extension after the Track 1 SDK was deprecated and removed from the main CLI repository.

  • Replace deprecated DATA_COSMOS_TABLE and DATA_STORAGE resource types with Track 2 equivalents
  • Update storage and table client initialization to use new SDK patterns
  • Add VM size specifications to test commands for consistency

Reviewed Changes

Copilot reviewed 4 out of 18 changed files in this pull request and generated 1 comment.

File Description
src/aem/setup.py Increments version from 1.0.0 to 1.0.1
src/aem/azext_aem/tests/latest/test_aem_commands.py Adds VM size parameter and changes test location for consistency
src/aem/azext_aem/custom.py Updates storage and table service clients from Track 1 to Track 2 SDK
src/aem/HISTORY.rst Documents the SDK migration in release notes

blob_client = blob_service_client.get_blob_client(container, blob)
# convert to GB
return int(storage_client.get_blob_properties(container, blob).properties.content_length / (1 << 30))
return int(blob_client.properties.size / (1 << 30))
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code assumes blob_client.properties exists without first calling get_blob_properties(). The properties may not be populated until explicitly retrieved. Consider calling blob_properties = blob_client.get_blob_properties() and then accessing blob_properties.size.

Suggested change
return int(blob_client.properties.size / (1 << 30))
blob_properties = blob_client.get_blob_properties()
return int(blob_properties.size / (1 << 30))

Copilot uses AI. Check for mistakes.
@calvinhzy calvinhzy merged commit 1b34847 into Azure:main Sep 1, 2025
25 checks passed
@azclibot
Copy link
Collaborator

azclibot commented Sep 1, 2025

[Release] Update index.json for extension [ aem-1.0.1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=135644639&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants